 #{extends 'main.html' /}
<title>Execution Centre</title>
<h1>Execution Centre</h1>
<br>
#{if departments}
<table style="width: 83%" align="center" border="1" cellspacing="0">
<tr>
<th>Department</th>
<th>promotions</th>
</tr>
#{list items:departments, as:'department'}
<tr>
<td>
<a href="@{Application.viewDepartment(id)}">${department.name}</a>
</td>
<td>
#{if department.executionCenter}
#{list items:department.executionCenter, as:'promoted'}

<a href="@{Application.promotedIdea(department.id,promoted.id)}" >${promoted.title}</a>
<br><br>
#{/list}
</td>
</tr>
#{/if}
#{else}
No promoted ideas in this department !!
#{/else}
#{/list}
</table>
#{/if}
#{else}
No department exist yet !!
#{/else}